<!--入库单-->
<template>
    <el-form :model="instockform" ref="instockref" :inline="true" style="text-align: left;">
        <el-form-item label="入库单号:" prop="code">
            <el-input placeholder="请输入" v-model="instockform.code"></el-input>
        </el-form-item>
        <el-form-item label="入库类型" prop="type">
            <el-select placeholder="请选择" style="width:200px" v-model="instockform.type">
                <el-option v-for="item in types" :key="item.bus_id" :label="item.bus_name" :value="item.bus_name"></el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="单据状态" prop="status">
            <el-select placeholder="请选择" style="width:200px" v-model="instockform.status">
                <el-option v-for="item in status" :key="item.dict_value" :label="item.dict_label" :value="item.dict_value"></el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="仓库名称" prop="whid">
            <el-select placeholder="请选择" v-model="instockform.whid" style="width:200px">
                <el-option v-for="item in warehouse" :key="item.wh_id" :label="item.wh_name" :value="item.wh_id"></el-option>
            </el-select>
        </el-form-item>
        <el-form-item>
            <el-button @click="Reset">重置</el-button>
            <el-button type="success" @click="Search">查询</el-button>
            <el-button @click="AdvancedSearch">高级查询</el-button>
        </el-form-item>
    </el-form>
    <div style="text-align: left;">
        <el-button type="success" @click="ShowAdd">添加</el-button>
        <el-button type="danger" @click="ShowDeleteAll">删除</el-button>
        <el-button @click="ShowAudit">审核</el-button>
        <el-button @click="ShowCancelAll">撤销</el-button>
        <el-button @click="Export">导出</el-button>
        <el-button @click="Refresh">刷新</el-button>
    </div>
    <!--表格-->
    <el-table :data="instockdata"  stripe style="margin-top: 10px;" @selection-change="SelectChange">
        <el-table-column fixed  type="selection"></el-table-column>
        <el-table-column fixed  type="index" label="序号" width="100"></el-table-column>
        <el-table-column fixed  label="入库单号" width="200px">
            <template #default="scope">
                <span style="color: green;cursor: pointer;" @click="ShowInfo(scope.row)">{{ scope.row.in_code }}</span>
            </template>
        </el-table-column>
        <el-table-column fixed prop="in_type" label="入库类型"></el-table-column>
        <el-table-column fixed prop="in_status" label="状态"></el-table-column>
        <el-table-column fixed prop="in_date" label="入库日期" width="200px"></el-table-column>
        <el-table-column prop="wh_name" label="仓库名称" width="200px"></el-table-column>
        <el-table-column prop="in_order" label="关联单号" width="200px"></el-table-column>
        <el-table-column label="入库货品" width="300px">
            <template #default="scope">
                <el-tooltip
                    effect="dark"
                    :content="scope.row.proc_list_full"
                    placement="top"
                    :disabled="!scope.row.proc_list_full || scope.row.proc_list_full.split('、').length <= 3"
                >
                    <span>{{ scope.row.proc_list }}</span>
                </el-tooltip>
            </template>
        </el-table-column>
        <el-table-column prop="in_user" label="经办人"></el-table-column>
        <el-table-column prop="in_num" label="入库数量"></el-table-column>
        <el-table-column prop="in_total" label="入库金额" width="120px"></el-table-column>
        <el-table-column prop="create_name" label="制单人"></el-table-column>
        <el-table-column prop="create_time" label="制单时间" width="200px"></el-table-column>
        <el-table-column prop="approver_name" label="审核人"></el-table-column>
        <el-table-column prop="approver_time" label="审核时间" width="200px"></el-table-column>
        <el-table-column label="操作" fixed="right" width="160px">
            <template #default="scope">
                <el-button 
                    v-if="['草稿', '待审核'].includes(scope.row.in_status)"
                    type="success" 
                    text="编辑" @click="ShowUpdate(scope.row)">
                    编辑
                </el-button>
                <el-button 
                    v-if="['草稿', '待审核'].includes(scope.row.in_status)"
                    type="danger" 
                    text="删除" @click="ShowDelete(scope.row.in_id)">
                    删除
                </el-button>
                <el-button 
                    v-if="['驱回'].includes(scope.row.in_status)"
                    type="danger" 
                    text="撤销" @click="ShowCancel(scope.row.in_id)">
                    撤销
                </el-button>
            </template>
        </el-table-column>
    </el-table>

     <!-- 页码 -->
    <el-pagination :page-size=10 :pager-count="11" layout="prev, pager, next,jumper" :total="rows"
        v-on:current-change="handlePageChange" style="float:right;margin-top:20px">
    </el-pagination>

    <!--高级搜索-->
    <el-drawer v-model="drawer">
        <template #header>
            <h4 style="text-align: left;">高级查询</h4>
        </template>
        <template #default>
            <el-form label-width="120px" label-position="top" :model="searchform" ref="searchref">
                <el-row :gutter="24">
                    <!-- 左列 -->
                    <el-col :span="12">
                        <el-form-item label="入库单号" prop=code>
                            <el-input placeholder="请输入" v-model="searchform.code"/>
                        </el-form-item>
                        <el-form-item label="入库金额" prop="total">
                            <div style="display: flex; align-items: center;">
                                <el-input placeholder="请输入" v-model="searchform.starttotal" />
                                <span style="margin: 0 8px;">~</span>
                                <el-input placeholder="请输入" v-model="searchform.endtotal"/>
                            </div>
                        </el-form-item>
                        <el-form-item label="入库日期" prop="date">
                            <el-date-picker v-model="searchform.date" type="datetimerange" range-separator="To" start-placeholder="Start date" end-placeholder="End date" />
                        </el-form-item>
                        <el-form-item label="入库数量"  prop="num">
                            <div style="display: flex; align-items: center;">
                                <el-input placeholder="请输入" v-model="searchform.startnum"/>
                                <span style="margin: 0 8px;">~</span>
                                <el-input placeholder="请输入" v-model="searchform.endnum"/>
                            </div>
                        </el-form-item>
                        <el-form-item label="单据状态" prop="status">
                            <el-select placeholder="请选择" v-model="searchform.status">
                                <el-option v-for="item in status" :key="item.dict_value" :label="item.dict_label" :value="item.dict_value"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="入库类型" prop="type">
                            <el-select placeholder="请选择" style="width:200px" v-model="searchform.type">
                                <el-option v-for="item in types" :key="item.bus_id" :label="item.bus_name" :value="item.bus_name"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="仓库名称" prop="whid">
                            <el-select placeholder="请选择" v-model="searchform.whid" style="width:200px">
                                <el-option v-for="item in warehouse" :key="item.wh_id" :label="item.wh_name" :value="item.wh_id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <!-- 右列 -->
                    <el-col :span="12">
                        <el-form-item label="制单人" prop="createname">
                            <el-input placeholder="请输入" v-model="searchform.createname"/>
                        </el-form-item>
                        <el-form-item label="制单时间" prop="createtime">
                            <el-date-picker v-model="searchform.createtime" type="datetimerange" range-separator="To" start-placeholder="Start date" end-placeholder="End date" />
                        </el-form-item>
                        <el-form-item label="审核人" prop="approvername">
                            <el-input placeholder="请输入" v-model="searchform.approvername"/>
                        </el-form-item>
                        <el-form-item label="审核时间" prop="approvertime">
                            <el-date-picker v-model="searchform.approvertime" type="datetimerange" range-separator="To" start-placeholder="Start date" end-placeholder="End date" />
                        </el-form-item>
                        <el-form-item label="经办人" prop="inuser">
                            <el-input placeholder="请输入" v-model="searchform.inuser"/>
                        </el-form-item>
                        <el-form-item label="关联单号" prop="inorder">
                            <el-input placeholder="请输入" v-model="searchform.inorder"/>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
        </template>
        <template #footer>
            <div style="flex: auto">
                <el-button @click="AdvancedReset">重置</el-button>
                <el-button @click="drawer = false">关闭</el-button>
                <el-button type="primary" @click="AdvancedOk">确定</el-button>
            </div>
        </template>
    </el-drawer>

    <!--删除模态框-->
    <el-dialog v-model="DeleteialogVisible" width="400" style="text-align: left;"  align-center>
        <span>确定删除吗?</span>
        <template #footer>
            <div class="dialog-footer">
                <el-button v-on:click="DeleteialogVisible = false">取消</el-button>
                <el-button type="primary" @click="Delete()">确定</el-button>
            </div>
        </template>
    </el-dialog>

    <!--选中删除模态框-->
    <el-dialog v-model="DeleteialogVisible2" width="400" style="text-align: left;"  align-center>
        <span>确定删除选中的数据吗?</span>
        <template #footer>
            <div class="dialog-footer">
                <el-button v-on:click="DeleteialogVisible2 = false">取消</el-button>
                <el-button type="primary" @click="DeleteAll()">确定</el-button>
            </div>
        </template>
    </el-dialog>

    <!--撤销模态框-->
    <el-dialog v-model="CancelDialogVisible" width="400" style="text-align: left;"  align-center>
        <span>确定撤销吗?</span>
        <template #footer>
            <div class="dialog-footer">
                <el-button v-on:click="CancelDialogVisible = false">取消</el-button>
                <el-button type="primary" @click="Cancel()">确定</el-button>
            </div>
        </template>
    </el-dialog>

    <!--选中撤销模态框-->
    <el-dialog v-model="CancelDialogVisible2" width="400" style="text-align: left;"  align-center>
        <span>确定撤销选中的数据吗?</span>
        <template #footer>
            <div class="dialog-footer">
                <el-button v-on:click="CancelDialogVisible2 = false">取消</el-button>
                <el-button type="primary" @click="CancelAll()">确定</el-button>
            </div>
        </template>
    </el-dialog>

    <!--审核模态框-->
    <el-dialog v-model="AuditDialogVisible" title="审核" width="400" style="text-align: left;" align-center>
        <div>
            <div style="margin-bottom: 15px;">
                <div>审核结果</div>
                <div style="margin-top: 10px;">
                    <el-radio v-model="auditResult" label="通过" style="margin-right: 20px;" value="6">通过</el-radio>
                    <el-radio v-model="auditResult" label="驳回" value="3">驳回</el-radio>
                </div>
            </div>
            <div>
                <div>审核意见</div>
                <el-input 
                    v-model="auditComment" 
                    type="textarea" 
                    rows="5" 
                    placeholder="请输入"
                    style="margin-top: 10px;"
                ></el-input>
            </div>
        </div>
        <template #footer>
            <div class="dialog-footer">
                <el-button @click="AuditDialogVisible = false">取消</el-button>
                <el-button type="primary" @click="Audit()">确定</el-button>
            </div>
        </template>
    </el-dialog>
</template>

<script>
import {ref,reactive,onMounted, computed} from 'vue';
import http from '../auth/index';
import { ElMessage, ElMessageBox, ElLoading } from 'element-plus';
import { useRouter } from 'vue-router';//路由
import * as XLSX from 'xlsx';
export default {
setup() {
    const router = useRouter();
    const user = JSON.parse(sessionStorage.getItem("user"));
    function formatDateTime(date) {
        const year = date.getFullYear();
        const month = String(date.getMonth() + 1).padStart(2, '0');
        const day = String(date.getDate()).padStart(2, '0');
        const hours = String(date.getHours()).padStart(2, '0');
        const minutes = String(date.getMinutes()).padStart(2, '0');
        const seconds = String(date.getSeconds()).padStart(2, '0');
        return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    }
    //转换入库货品
    function formatGoodsList(goods) {
        if (!goods) return "";
        const goodsArray = Array.isArray(goods) ? goods : goods.split('、').filter(Boolean);
        if (goodsArray.length <= 3) {
            return goodsArray.join('、');
        } else {
            const firstThree = goodsArray.slice(0, 3).join('、');
            return `${firstThree}等${goodsArray.length}项....`;
        }
    }
    // 入库类型
    const types = ref([]);
    function GetTypes() {
        return http.get("/BusinessType/GetBusinessTypes?field=入库")
        .then(res => {
            types.value = res.data;
        }).catch(err => {
            console.log(err);
        })
    }
    // 单据状态
    const status = ref([]);
    function GetStatus() {
        return http.get("/DictData/GetAllDictDataBytype?typeid=6")
        .then(res => {
            status.value = res.data;
        }).catch(err => {
            console.log(err);
        })
    }
     //查询所有仓库
    const warehouse=ref([]);
    function AllWarehouse(){
        http.get("/Warehouse/GetWarehouses")
        .then(res=>{
                warehouse.value=res.data;
        }).catch(err=>{
                console.log(err);
        })
    }

    // 选中数据
    const selectdata = ref([]);
    function SelectChange(val) {
        selectdata.value = val;
    }
    // 导出
    function Export() {
        if (selectdata.value.length == 0) {
            ElMessage({ message: '请选择要导出的数据.', type: 'warning', });
            return;
        }
        const wb = XLSX.utils.book_new();
        const excelData = selectdata.value.map((row) => ({
            "入库单号": row.in_code,
            "入库类型": row.in_type,
            "状态": row.in_status,
            "入库日期": row.in_date,
            "仓库名称": row.wh_name,
            "关联单号": row.in_order,
            "入库货品": row.proc_list,
            "经办人": row.in_user,
            "入库数量": row.in_num,
            "入库金额": row.in_total,
            "制单人": row.create_name,
            "制单时间": row.create_time,
            "审核人": row.approver_name,
            "审核时间": row.approver_time
        }));
        const ws = XLSX.utils.json_to_sheet(excelData);
        XLSX.utils.book_append_sheet(wb, ws, "入库单");
        XLSX.writeFile(wb, `入库单${new Date().toLocaleDateString()}.xlsx`);
    }
    
    //当前选中的id
    const instockid = ref("");

    //刷新
    function Refresh() {
        All();
    }
    

    //#region 查询
    const instockref = ref("");
    const instockform = reactive({
        code: "",
        type: "",
        status: "",
        whid: ""
    });
    //重置
    function Reset() {
        instockref.value?.resetFields();
        All();
    }
    const instockdata = ref([]);
    const rows = ref(0);
    const currentPage = ref(1);
    const dateFormat = 'YYYY-MM-DD HH:mm:ss';
    const statusMap = computed(() => {
        const map = {};
        if (status.value && status.value.length > 0) {
            status.value.forEach(item => {
                map[item.dict_value] = item.dict_label;
            });
        }
        return map;
    });
    //查询
    function Search() {
        All();
    }
    function All() {
        http.get("/Instock_h/GetInstock_h", {
            params: {
                code: instockform.code,
                type: instockform.type,
                status: instockform.status,
                whid: instockform.whid,
                CurrentPage: currentPage.value
            }
        }).then(res => {
            rows.value = res.data.rows;
            if (res.data.list.length == 0) {
                ElMessage({ message: '没有相关数据.', type: 'warning', })
            }
            const Data = res.data.list.map(item => ({
                ...item,
                in_date: formatDateTime(new Date(item.in_date)),
                create_time: formatDateTime(new Date(item.create_time)),
                approver_time: item.approver_time ? formatDateTime(new Date(item.approver_time)) : "",
                in_total: item.in_total ? Number(item.in_total).toFixed(2) : "0.00",
                proc_list_full: item.proc_list,
                proc_list: formatGoodsList(item.proc_list),
                in_status: statusMap.value[item.in_status] || "未知状态",
            }));

            // 按照创建时间降序排序
            Data.sort((a, b) => new Date(b.create_time) - new Date(a.create_time));

            instockdata.value = Data;
        }).catch(err => {
            console.log(err)
        })
    }
    function handlePageChange(page) {
        currentPage.value = page;
        All();
    }
    //#endregion
    

    //#region 高级查询
    const drawer = ref(false);
    function AdvancedSearch() {
        drawer.value = true;
    }
    const searchref = ref("");
    const searchform = reactive({
        code: "",
        total: "",
        starttotal: "",
        endtotal: "",
        date: [null, null],
        num: "",
        startnum: "",
        endnum: "",
        status: "",
        type: "",
        whid: "",
        createname: "",
        createtime: [null, null],
        approvername: "",
        approvertime: [null, null],
        inuser: "",
        inorder: ""
    });
    //重置
    function AdvancedReset() {
        searchref.value?.resetFields();
        searchform.starttotal = "";
        searchform.endtotal = "";
        searchform.startnum = "";
        searchform.endnum = "";
    }
    function AdvancedOk() {
        http.get("/Instock_h/GetAdvancedInstock_h", {
            params: {
                code: searchform.code,
                starttotal: searchform.starttotal,
                endtotal: searchform.endtotal,
                startdate: searchform.date[0],
                enddate: searchform.date[1],
                startnum: searchform.startnum,
                endnum: searchform.endnum,
                status: searchform.status,
                type: searchform.type,
                whid: searchform.whid,
                createname: searchform.createname,
                startcreatetime: searchform.createtime[0],
                endcreatetime: searchform.createtime[1],
                approvername: searchform.approvername,
                startapprovertime: searchform.approvertime[0],
                endapprovertime: searchform.approvertime[1],
                inuser: searchform.inuser,
                inorder: searchform.inorder,
                CurrentPage: currentPage.value
            }
        }).then(res => {
            rows.value = res.data.rows;
            if (res.data.list.length == 0) {
                ElMessage({ message: '没有相关数据.', type: 'warning', })
            }
            const Data = res.data.list.map(item => ({
                ...item,
                in_date: formatDateTime(new Date(item.in_date)),
                create_time: formatDateTime(new Date(item.create_time)),
                approver_time: item.approver_time ? formatDateTime(new Date(item.approver_time)) : "",
                in_total: item.in_total ? Number(item.in_total).toFixed(2) : "0.00",
                proc_list_full: item.proc_list,
                proc_list: formatGoodsList(item.proc_list),
                in_status: statusMap.value[item.in_status] || "未知状态",
            }));
            instockdata.value = Data;
        }).catch(err => {
            console.log(err)
        })
    }

    //#endregion
    
    //#region 跳转新增页面
    function ShowAdd() {
        router.push("instockadd");
    }
    //#endregion


    //#region 删除
    // 删除
    const DeleteialogVisible = ref(false);
    function ShowDelete(id) {
        instockid.value = id;
        DeleteialogVisible.value = true;
    }
    async function Delete() {
        try {
            // 直接调用删除接口，不再处理库存
            const deleteRes = await http.put("/Instock_h/DeleteInstock_h?id=" + instockid.value);
            if (deleteRes.data > 0) {
                ElMessage({ message: '删除成功.', type: 'success' });
                All();
                DeleteialogVisible.value = false;
            } else {
                ElMessage.error('删除失败.');
            }
        } catch (err) {
            console.error("删除失败:", err);
            ElMessage.error('删除操作失败.');
        }
    }
    const DeleteialogVisible2 = ref(false);
    function ShowDeleteAll() {
        if (selectdata.value.length == 0) {
            ElMessage({ message: '请选择要删除的数据.', type: 'warning', });
            return;
        }
        const invalidItems = selectdata.value.filter(item => !['草稿', '待审核'].includes(item.in_status));
        if (invalidItems.length > 0) {
            ElMessage({ message: '选中的单据中包含不可删除的状态(只有草稿或待审核状态可删除)', type: 'warning', });
            return;
        }
        DeleteialogVisible2.value = true;
    }
    async function DeleteAll() {
        try {
            const deletePromises = selectdata.value.map(row =>
                http.put("/Instock_h/DeleteInstock_h?id=" + row.in_id)
            );
            
            // 并行执行所有删除请求
            await Promise.all(deletePromises);

            ElMessage({ message: '选中单据已成功删除.', type: 'success' });
            All();
            DeleteialogVisible2.value = false;
        } catch (err) {
            console.error("批量删除失败:", err);
            ElMessage.error('批量删除操作失败.');
        }
    }
    //#endregion


    //#region 跳转修改页面
    function ShowUpdate(row) {
        router.push({ name: "instockupdate", params: { instockid: row.in_id, instockcode: row.in_code } });
    }
    //#endregion

    //#region 撤销
    // 撤销
    const CancelDialogVisible = ref(false);
    function ShowCancel(id) {
        instockid.value = id;
        CancelDialogVisible.value = true;
    }
    function Cancel() {
        http.put("/Instock_h/UpdateStatus?instockid=" + instockid.value + "&status=2")
        .then(res => {
            if (res.data > 0) {
                ElMessage({ message: '撤销成功.', type: 'success', })
                All();
                CancelDialogVisible.value = false;
            } else {
                ElMessage.error('撤销失败.')
            }
        }).catch(err => {
            console.log(err);
        })
    }
    const CancelDialogVisible2 = ref(false);
    function ShowCancelAll() {
        if (selectdata.value.length === 0) {
            ElMessage({ message: '请选择要撤销的单据.', type: 'warning', });
            return;
        }
        const validItems = selectdata.value.filter(item => item.in_status === "驱回");
        if (validItems.length === 0) {
            ElMessage({ message: '选中的单据中没有可撤销的单据(只有驱回状态可撤销)', type: 'warning', });
            return;
        }
        CancelDialogVisible2.value = true;
    }
    function CancelAll() {
        selectdata.value.forEach(item => {
            if (item.in_status === "驱回") {
                http.put("/Instock_h/UpdateStatus?instockid=" + item.in_id + "&status=2")
                .then(res => {
                    if (res.data > 0) {
                        ElMessage({ message: '撤销成功.', type: 'success', })
                        All();
                        CancelDialogVisible2.value = false;
                    } else {
                        ElMessage.error('撤销失败.')
                    }
                }).catch(err => {
                    console.log(err);
                })
            }
        })
    }
    //#endregion

    //#region 审核
    // 审核
    const AuditDialogVisible = ref(false);
    const auditResult = ref("3");
    const auditComment = ref("");
    function ShowAudit() {
        if (selectdata.value.length == 0) {
            ElMessage({ message: '请选择要审核的单据.', type: 'warning', })
            return;
        }
        const validItems = selectdata.value.filter(item => item.in_status === "待审核");
        if (validItems.length == 0) {
            ElMessage({ message: '选中的单据中没有可审核的单据(只有待审核状态可审核)', type: 'warning', })
            return;
        }
        AuditDialogVisible.value = true;
    }
    async function Audit() {
        try {
            // 遍历每个待审核的单据
            for (const item of selectdata.value) {
                if (item.in_status === "待审核") {
                    // 审核前检查仓库是否锁定
                    if (item.wh_id) {
                        try {
                            const warehouseRes = await http.get(`/Warehouse/GetIdWarehouse?id=${item.wh_id}`);
                            if (warehouseRes.data && warehouseRes.data.is_lock === 1) {
                                ElMessage.error(`该仓库已被锁定，不能进行审核操作！`);
                                continue; // 跳过这个单据，继续处理下一个
                            }
                        } catch (error) {
                            console.error("获取仓库状态失败:", error);
                            ElMessage.warning(`无法验证入库单 ${item.in_code} 的仓库状态，跳过审核`);
                            continue;
                        }
                    }

                    // 仓库未锁定，执行审核
                    const res = await http.put("/Instock_h/ApproverInstock_h?instockid=" + item.in_id + "&status=" + auditResult.value + "&approvername=" + user.name + "&approvertime=" + formatDateTime(new Date()));
                    
                    if (res.data > 0) {
                        ElMessage.success(`审核成功`);
                    } else {
                        ElMessage.error(`审核失败`);
                    }
                }
            }
            
            // 刷新列表并关闭对话框
            All();
            AuditDialogVisible.value = false;
            
        } catch (error) {
            console.error("审核过程中发生错误:", error);
            ElMessage.error('审核操作失败');
        }
    }
    //#endregion

    //#region 查看详情
    function ShowInfo(row) {
        router.push({ name: "instockinfo", params: { instockid: row.in_id, instockcode: row.in_code } });
    }
    //#endregion


    //挂载
    onMounted(() => {
        GetTypes();
        GetStatus().then(() => {
            All();
        });
        AllWarehouse();
    });


    return {
        AdvancedSearch,
        drawer,
        status,
        types,
        warehouse,
        instockref,
        instockform,
        Reset,
        instockdata,
        rows,
        currentPage,
        dateFormat,
        handlePageChange,
        Search,
        searchform,
        searchref,
        AdvancedReset,
        AdvancedOk,
        ShowAdd,
        selectdata,
        SelectChange,
        Export,
        DeleteialogVisible,
        ShowDelete,
        Delete,
        instockid,
        DeleteAll,
        DeleteialogVisible2,
        ShowDeleteAll,
        ShowUpdate,
        ShowCancel,
        CancelDialogVisible,
        Cancel,
        CancelDialogVisible2,
        ShowCancelAll,
        CancelAll,
        AuditDialogVisible,
        auditResult,
        auditComment,
        ShowAudit,
        Audit,
        Refresh,
        ShowInfo
    }
}
}
</script>

<style scoped>
</style>
